<link href="/public/css/main.css" rel="stylesheet">
    <div class="login_div">
        <form  action='/home/passport/subregister' method="post" id='register_form'>
        	<div class='form-group row'>
                <label for="exampleInputName2">公司名称:</label>
                <input type="text" class="form-control" id='store_name' name='store_name' placeholder="请输入公司名称" value=""  />
            	<span id='check_store' style='color:red'> </span>
            </div>
            <div class='form-group row'>
                <label for="exampleInputName2">真实姓名:</label>
                <input type="text" class="form-control" id='name' name='name' placeholder="请输入姓名" value=""  />
            	<span id='check_name' style='color:red'> </span>
            </div>
            <div class='form-group row'>
                <label for="exampleInputName2">账号(手机号):</label>
                <input type="text" class="form-control" name="mobile" id='mobile' placeholder="请输入手机号码" value=""  />
            	<span id='check_mobile' style='color:red'> </span>
            </div>
         
            <div class="form-group login_sub">
                <input type="button" class="btn btn-info" name="" id='_submit' value="提交">
            </div>
        </form>
    </div>
</div>
</div>  
<script type='text/javascript'>
$(document).ready(function(){
    $('#_submit').click(function(){
        var mobile = $("#mobile").val();
        var name=$('#name').val();
        var store_name=$('#store_name').val();
        var reg=/^(((1[1-9]{1}[0-9]{1})|(15[0-9]{1}))+\d{8})$/;
        if(store_name==''){
            $('#check_store').html('请输入门店/公司名称');
            return;
        }
        if(name==''){
            $('#check_name').html('请输入姓名');
            return;
        }
        if(!reg.test(mobile)){
            $('#check_mobile').html('请正确输入联系方式');
            return;
        }
        $.ajax({
            url: "/home/passport/apply_submit?name=" + name + "&mobile=" + mobile + "&store_name=" + store_name, 
            async: true, 
            success: function (msg){
                if(msg==true){
                    alert('您的信息我们已经收到，我们会尽快和您联系！');
                    history.go(-1);
                }else{
                    alert('信息有误！请您正确填写信息。');
                }
            }
        });
    });
    
})



</script>